<extend name="Public/common"/>
<block name="othercss">
</block>
<block name="header">
<div class="header">
    <div class="clearfix box">
     
      <a class="return" href="{:urlrotue('Member/index')}"> <i class="return-icon"></i></a> 
        <h2>我的订单</h2>
    </div>
</div>
</block>

<block name="body">

<div class="container pt50">
    <div class="vip-nav">
       <a href="{:urlrotue('Member/myorder')}" <if condition="$status_mark eq 0">class="on"</if>>全部</a>
        <a href="{:urlrotue('Member/myorder',Array('status_mark'=>1))}" <eq name="status_mark" value="1">class="on"</eq>>待付款</a>
       <a href="{:urlrotue('Member/myorder',Array('status_mark'=>3))}" <eq name="status_mark" value="3">class="on"</eq>>待发货</a>
         <a href="{:urlrotue('Member/myorder',Array('status_mark'=>4))}" <eq name="status_mark" value="4">class="on"</eq>>待收货</a>
         <a href="{:urlrotue('Member/myorder',Array('status_mark'=>5))}" <eq name="status_mark" value="5">class="on"</eq>>已完成</a>
    </div>
    <!--vip2_sum li.on表示已完成的订单-->
    
    <foreach name="list" item="item">
    <ul class="vip2_sum">
        <li>
            <!--编码-->
            <div class="no clearfix">
                <div class="right"> 
                {$item.status_str}
                 </div>
                <div class="left">订单编号：{$item.order_no}</div>
            </div>
             <volist name="item.goods" id="vo">
            <a class="pro-cell clearfix"  href="{:urlrotue('Goods/index',Array('id'=>$vo['goods_id']))}">
                <img src="__ROOT__{$vo['goods_picture']}"/>
                <div class="lans clearfix">
                    <div class="right">
                        <div class="price">¥ {$vo['goods_price']}</div>
                        <div class="number">x {$vo.goods_num}</div>
                    </div>
                    <div class="left">
                        <div class="title twos">{$vo.goods_name} &nbsp;
                           </div>
                        <div class="mess">{$vo.goods_spec}</div>
                    </div>
                </div>
            </a>
            </volist>
            <!--计算及按钮-->
            <div class="btnsum clearfix">
            <if condition="$item.status_delivery eq 2">
                 <a href="javascript:void(0)" onclick="delivery_4({$item.order_id})" class="btn on">确认收货</a>
                </if>
            <if condition="($item.status_pay eq 1 OR $item.status_pay eq 2) AND ($item.pay_type eq 1) AND ($item.status eq 1 OR $item.status eq 2)"><a class="btn on" href="{:U('Check/success',array('id'=>$item['order_id']))}">立即付款</a></if>

                <a class="btn" href="{:U('Member/orderinfo',array('id'=>$item['order_id']))}">订单详情</a>

                 商品总价：<span style="font-size: 16px">¥ {$item.total_cart}</span>
            </div>
        </li>
       
    </ul>
    </foreach>
    <div class="pagetion" style="margin-top:20px;">
      {$page}
    </div>
</div>
</block>
<block name="footer">
</block>
<block name="otherjs">
 <script type="text/javascript">
               var url_delivery_4 = "{:urlrotue('order_delivery_4')}"; //确认到货
                function delivery_4(order_id) {   
					 layer.load(2, {time: 10*1000});
						 
                        $.getJSON(url_delivery_4, {order_id, order_id}, function(json){
                        if (json.status == 'success') {
							layer.msg("操作成功", {icon: 1});
                            document.location.reload();
                        } else {
						layer.msg("操作失败", {icon: 5});	
                        }
                        });
                }
    </script>

</block>

